<include file="Public:header" />
<!--商品列表-->
<div class="subnav">
	<div class="content_menu ib_a blue line_x">
	<a class="add fb " data-field="status" data-value="1" href="{:U('finance/flist')}" style="background:#FF1F1F;"><em style="background:#FF1F1F;">淘宝分成</em></a>
	<a class="add fb " data-field="status" data-value="1" href="{:U('finance/pddlist')}" style="background:#ec971f;"><em style="background:#ec971f;">拼多多分成</em></a>
	
	<!--<a class="add fb "  href="javascript:tqk_collect()" data-field="status" data-value="1" href="{:U('finance/createstat')}" ><em>生成代理分成报表</em></a>-->
	
	<!--每月{:C('yh_ComputingTime')}号点击这个按钮生成分成报表 (提示：1.点击生成报表之前请在"<a href="{:U('order/index')}" style="color: #FF0000;">订单管理</a>"导入一次维权订单 2.请不要重复生成结算数据)-->
	
	</div>
</div>
<div class="pad_10" >

    <table width="100%" cellspacing="0" class="search_form">
        <tbody>
            <tr>
                <td>
                <div class="explain_col">
                	    <form name="searchform" method="get" >
                    <input type="hidden" name="m" value="admin" />
                    <input type="hidden" name="c" value="finance" />
                    <input type="hidden" name="a" value="flist" />
                    <input type="hidden" name="menuid" value="{$menuid}" />
                    &nbsp;&nbsp;站长手机号:
                    <input name="keyword" type="text" class="input-text" size="25" value="{$search.keyword}" />
                    &nbsp;&nbsp;状态 :
                    <select name="status">
                    <option value="">-{:L('all')}-</option>
                    <option value="2" <if condition="$search.status eq '2'">selected="selected"</if>>待付款</option>
                    <option value="1" <if condition="$search.status eq '1'">selected="selected"</if>>已付款</option>
                    </select>
                    &nbsp;&nbsp;
                    <input type="submit" name="search" class="btn" value="搜索" />
                 </form>
                   <div class="bk8"></div>                
                </div>
                </td>
            </tr>
        </tbody>
    </table>

    <div class="J_tablelist table_list" data-acturi="{:U('finance/ajax_edit')}">
    <table width="100%" cellspacing="0">
        <thead>
            <tr>
                <th width=25><input type="checkbox" id="checkall_t" class="J_checkall"></th>
                <th width="80"><span data-tdtype="order_by" data-field="uname">结算日期</span></th>
                 <th width="80"><span data-tdtype="order_by" data-field="uname">所属站长</span></th>
                  <th width="80"><span data-tdtype="order_by" data-field="uname">姓名</span></th>
                   <th width="80"><span data-tdtype="order_by" data-field="uname">支付宝</span></th>
                <th><span data-tdtype="order_by" data-field="item_name">预估金额</span></th>
                <th ><span data-tdtype="order_by" data-field="item_num">客户返利金额</span></th>
                <th ><span data-tdtype="order_by" data-field="order_score">结算金额</span></th>
                <th ><span data-tdtype="order_by" data-field="order_score">备注</span></th>
                <th width="60"><span data-tdtype="order_by" data-field="status">{:L('status')}</span></th>
                <th width="120">{:L('operations_manage')}</th>
            </tr>
        </thead>
        <tbody>
            <volist name="orderlist" id="val" >
    <if condition="$val['type'] eq 1">	
            <tr>
                <td align="center"><input type="checkbox" class="J_checkitem" value="{$val.id}"></td>
                <td align="center">{$val.add_time}</td>
                <td align="center"><a href="{:U('user/index',array('uid'=>$val['uid']))}" target="_blank">{$val.phone}</a></td>
                <td align="center">{$val.name}</td>
                <td align="center">{$val.alipay}</td>
                <td align="center">{$val.price}</td>
                <td align="center">
               {$val.backcash}
                </td>
                <td align="center">
                	 {$val.income}
               </td> 
                <td align="center">
                	 {$val.mark}
               </td> 
                <td align="center">
              {$val.status}
                </td>
               <td align="center">
<if condition="$val['status_t'] eq 2">
  <a href="javascript:void(0);" class="J_confirmurl" data-uri="{:u('Finance/edit_status', array('id'=>$val['id']))}" data-acttype="ajax" data-msg="确认已经付款">确认付款</a> | 
   
</if>
<a href="javascript:void(0);" class="J_confirmurl" data-uri="{:u('Finance/delete_f', array('id'=>$val['id']))}" data-acttype="ajax" data-msg="{:sprintf(L('confirm_delete_one'),$val['title'])}">{:L('delete')}</a></td>
            </tr>
   <else/>        
            
 <tr>
                <td align="center"><input type="checkbox" class="J_checkitem" value="{$val.id}"></td>
                <td align="center">{$val.add_time}</td>
                <td align="center"><a href="{:U('user/index',array('uid'=>$val['uid']))}" target="_blank">{$val.phone}</a></td>
                <td align="center">--</td>
                <td align="center">--</td>
                <td align="center">{$val.price}</td>
                <td align="center">
               --
                </td>
                <td align="center">
                	 {$val.income}
               </td> 
                <td align="center">
                	 {$val.mark}
               </td> 
                <td align="center">
             已结算
                </td>
               <td align="center">
<a href="javascript:void(0);" class="J_confirmurl" data-uri="{:u('Finance/delete_f', array('id'=>$val['id']))}" data-acttype="ajax" data-msg="{:sprintf(L('confirm_delete_one'),$val['title'])}">{:L('delete')}</a></td>
            </tr>       
            
   </if> 
            
            </volist>
        </tbody>
    </table>
    </div>
    <div class="btn_wrap_fixed">
        <label class="select_all mr10"><input type="checkbox" name="checkall" class="J_checkall">{:L('select_all')}/{:L('cancel')}</label>
        <input type="button" class="btn" data-tdtype="batch_action" data-acttype="ajax" data-uri="{:U('finance/delete_f')}" data-name="id" data-msg="{:L('confirm_delete')}" value="{:L('delete')}" />
        <div id="pages">{$page}</div>
    </div>
</div>
<include file="Public:footer" />
<script type="text/javascript">
	//全选反选
	$('.J_checkall').live('click', function(){
		$('.J_checkitem').attr('checked', this.checked);
		$('.J_checkall').attr('checked', this.checked);
	});

    function tqk_collect(p){
        $.getJSON("{:U('finance/tuiquanke')}", {page:p?p:1}, function(result){
            if(result.status == 1){
            	if($.dialog.get('cmt_yhxia')){
                	$.dialog.get('cmt_yhxia').content(result.data);
            	}else{
            		$.dialog({id:'cmt_yhxia', title:'提示', content:result.data, padding:'', lock:true});
            	}
                p = result.msg;
                setTimeout("tqk_collect("+ p +")",1500);
            }else{
               if($.dialog.get('cmt_yhxia')){
                $.dialog.get('cmt_yhxia').close();
                $.yhxia.tip({content:result.msg});
               }else{
               	 $.yhxia.tip({content:result.msg});
               }
            }
        });
    }

</script>
</body>
</html>